package com.example.kt_temp.model.service

import com.example.kt_temp.model.Network
import com.example.kt_temp.model.entity.ArticleInfoResponse
import com.example.kt_temp.model.entity.ArticleListResponse
import retrofit2.http.GET
import retrofit2.http.Query

interface ArticleService {

    //article/list?pageOffset=1&pageSize=10
    @GET("article/list")
    suspend fun list(@Query("pageOffset") pageOffset:Int,@Query("pageSize") pageSize:Int): ArticleListResponse


    @GET("article/info")
    suspend fun info(@Query("id") id:String): ArticleInfoResponse


    companion object{
        fun instance():ArticleService{
            return Network.createService(ArticleService::class.java)
        }
    }
}